/*
 * main.cc
 *
 *  Created on: Nov 10, 2010
 *      Author: fify
 */

/*
 * An easy problem by comparing two words.
 */
#include <iostream>
#include <string.h>
#include <cmath>
#include <stdio.h>

using namespace std;

int count1[26];
int count2[26];

char word1[512];
char word2[512];

void solve()
{
	gets(word1);
	gets(word2);

	int len1 = strlen(word1);
	int len2 = strlen(word2);

	memset(count1, 0, sizeof(count1));
	memset(count2, 0, sizeof(count2));

	for(int i = 0;i<len1;i++)
	{
		count1[word1[i] - 'a'] ++;
	}

	for(int i = 0;i<len2;i++)
	{
		count2[word2[i] - 'a'] ++;
	}

	int ans = 0;
	for(int i = 0;i<26;i++)
	{
		int tmp = count1[i] - count2[i];
		if(tmp > 0)
		{
			ans += tmp;
		}
		else
		{
			ans -= tmp;
		}
	}

	static int cas = 1;
	printf("Case #%d:  %d\n", cas ++, ans);
}
int main()
{
	int n;
	cin >> n;
	getchar();
	for(int i = 0;i<n;i++)
	{
		solve();
	}
}
